.class public Lcom/peptalk/client/lbs/android/LocationManagerProxy;
.super Ljava/lang/Object;
.source "LocationManagerProxy.java"


# static fields
.field public static final GPS_PROVIDER:Ljava/lang/String; = "gps"

.field public static final KEY_LOCATION_CHANGED:Ljava/lang/String; = "location"

.field public static final KEY_PROVIDER_ENABLED:Ljava/lang/String; = "providerEnabled"

.field public static final KEY_PROXIMITY_ENTERING:Ljava/lang/String; = "entering"

.field public static final KEY_STATUS_CHANGED:Ljava/lang/String; = "status"

.field public static final LBS_PROVIDER:Ljava/lang/String; = "lbs"

.field public static final NETWORK_PROVIDER:Ljava/lang/String; = "network"

.field private static lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

.field private static locationManager:Landroid/location/LocationManager;

.field private static locationManagerProxy:Lcom/peptalk/client/lbs/android/LocationManagerProxy;


# direct methods
.method private constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 1
    .parameter "context"
    .parameter "lbsKey"

    .prologue
    .line 84
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 85
    const-string v0, "location"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/location/LocationManager;

    sput-object p0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    .line 86
    invoke-static {p1, p2}, Lcom/peptalk/client/lbs/android/LbsManager;->getInstance(Landroid/content/Context;Ljava/lang/String;)Lcom/peptalk/client/lbs/android/LbsManager;

    move-result-object v0

    sput-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    .line 87
    return-void
.end method

.method public static getInstance(Landroid/content/Context;)Lcom/peptalk/client/lbs/android/LocationManagerProxy;
    .locals 2
    .parameter "context"

    .prologue
    .line 96
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManagerProxy:Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    if-nez v0, :cond_0

    .line 97
    new-instance v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/peptalk/client/lbs/android/LocationManagerProxy;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    sput-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManagerProxy:Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    .line 99
    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManagerProxy:Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    return-object v0
.end method

.method public static getInstance(Landroid/content/Context;Ljava/lang/String;)Lcom/peptalk/client/lbs/android/LocationManagerProxy;
    .locals 1
    .parameter "context"
    .parameter "lbsKey"

    .prologue
    .line 110
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManagerProxy:Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    if-nez v0, :cond_0

    .line 111
    new-instance v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    invoke-direct {v0, p0, p1}, Lcom/peptalk/client/lbs/android/LocationManagerProxy;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    sput-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManagerProxy:Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    .line 113
    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManagerProxy:Lcom/peptalk/client/lbs/android/LocationManagerProxy;

    return-object v0
.end method


# virtual methods
.method public addGpsStautsListener(Landroid/location/GpsStatus$Listener;)Z
    .locals 1
    .parameter "listener1"

    .prologue
    .line 170
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->addGpsStatusListener(Landroid/location/GpsStatus$Listener;)Z

    move-result v0

    return v0
.end method

.method public addProximityAlert(DDFJLandroid/app/PendingIntent;)V
    .locals 9
    .parameter "latitude"
    .parameter "longitude"
    .parameter "radius"
    .parameter "expiration"
    .parameter "intent"

    .prologue
    .line 188
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    move-wide v1, p1

    move-wide v3, p3

    move v5, p5

    move-wide v6, p6

    move-object/from16 v8, p8

    invoke-virtual/range {v0 .. v8}, Landroid/location/LocationManager;->addProximityAlert(DDFJLandroid/app/PendingIntent;)V

    .line 189
    return-void
.end method

.method public addTestProvider(Ljava/lang/String;ZZZZZZZII)V
    .locals 11
    .parameter "name"
    .parameter "requiresNetwork"
    .parameter "requiresSatellite"
    .parameter "requiresCell"
    .parameter "hasMonetaryCost"
    .parameter "supportsAltitude"
    .parameter "supportsSpeed"
    .parameter "supportsBearing"
    .parameter "powerRequirement"
    .parameter "accuracy"

    .prologue
    .line 204
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    move-object v1, p1

    move v2, p2

    move v3, p3

    move v4, p4

    move/from16 v5, p5

    move/from16 v6, p6

    move/from16 v7, p7

    move/from16 v8, p8

    move/from16 v9, p9

    move/from16 v10, p10

    invoke-virtual/range {v0 .. v10}, Landroid/location/LocationManager;->addTestProvider(Ljava/lang/String;ZZZZZZZII)V

    .line 205
    return-void
.end method

.method public clearTestProviderEnabled(Ljava/lang/String;)V
    .locals 1
    .parameter "provider"

    .prologue
    .line 211
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->clearTestProviderEnabled(Ljava/lang/String;)V

    .line 212
    return-void
.end method

.method public clearTestProviderLocation(Ljava/lang/String;)V
    .locals 1
    .parameter "provider"

    .prologue
    .line 219
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->clearTestProviderLocation(Ljava/lang/String;)V

    .line 220
    return-void
.end method

.method public clearTestProviderStatus(Ljava/lang/String;)V
    .locals 1
    .parameter "provider"

    .prologue
    .line 227
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->clearTestProviderStatus(Ljava/lang/String;)V

    .line 228
    return-void
.end method

.method public destroy()V
    .locals 1

    .prologue
    .line 120
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-virtual {v0}, Lcom/peptalk/client/lbs/android/LbsManager;->destroy()V

    .line 121
    return-void
.end method

.method public getAllProviders()Ljava/util/List;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 234
    sget-object v1, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v1}, Landroid/location/LocationManager;->getAllProviders()Ljava/util/List;

    move-result-object v0

    .line 235
    .local v0, list:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    const-string v1, "lbs"

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 236
    return-object v0
.end method

.method public getBestProvider(Landroid/location/Criteria;Z)Ljava/lang/String;
    .locals 1
    .parameter "criteria"
    .parameter "enabledOnly"

    .prologue
    .line 246
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1, p2}, Landroid/location/LocationManager;->getBestProvider(Landroid/location/Criteria;Z)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getGpsStatus(Landroid/location/GpsStatus;)Landroid/location/GpsStatus;
    .locals 1
    .parameter "status"

    .prologue
    .line 255
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->getGpsStatus(Landroid/location/GpsStatus;)Landroid/location/GpsStatus;

    move-result-object v0

    return-object v0
.end method

.method public getLastKnownLocation(Ljava/lang/String;)Landroid/location/Location;
    .locals 1
    .parameter "provider"

    .prologue
    .line 264
    const-string v0, "lbs"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 265
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-virtual {v0}, Lcom/peptalk/client/lbs/android/LbsManager;->getLastKnownLocation()Landroid/location/Location;

    move-result-object v0

    .line 267
    :goto_0
    return-object v0

    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->getLastKnownLocation(Ljava/lang/String;)Landroid/location/Location;

    move-result-object v0

    goto :goto_0
.end method

.method public getProvider(Ljava/lang/String;)Landroid/location/LocationProvider;
    .locals 1
    .parameter "name"

    .prologue
    .line 277
    const-string v0, "lbs"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 278
    const/4 v0, 0x0

    .line 280
    :goto_0
    return-object v0

    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->getProvider(Ljava/lang/String;)Landroid/location/LocationProvider;

    move-result-object v0

    goto :goto_0
.end method

.method public getProviders(Landroid/location/Criteria;Z)Ljava/util/List;
    .locals 2
    .parameter "criteria"
    .parameter "enabledOnly"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/location/Criteria;",
            "Z)",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 301
    sget-object v1, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v1, p1, p2}, Landroid/location/LocationManager;->getProviders(Landroid/location/Criteria;Z)Ljava/util/List;

    move-result-object v0

    .line 302
    .local v0, list:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    const-string v1, "lbs"

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 303
    return-object v0
.end method

.method public getProviders(Z)Ljava/util/List;
    .locals 2
    .parameter "enabledOnly"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(Z)",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 289
    sget-object v1, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v1, p1}, Landroid/location/LocationManager;->getProviders(Z)Ljava/util/List;

    move-result-object v0

    .line 290
    .local v0, list:Ljava/util/List;,"Ljava/util/List<Ljava/lang/String;>;"
    const-string v1, "lbs"

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 291
    return-object v0
.end method

.method public isProviderEnabled(Ljava/lang/String;)Z
    .locals 1
    .parameter "provider"

    .prologue
    .line 312
    const-string v0, "lbs"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 313
    const/4 v0, 0x1

    .line 315
    :goto_0
    return v0

    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v0

    goto :goto_0
.end method

.method public removeGpsStatusListener(Landroid/location/GpsStatus$Listener;)V
    .locals 1
    .parameter "listener"

    .prologue
    .line 323
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->removeGpsStatusListener(Landroid/location/GpsStatus$Listener;)V

    .line 324
    return-void
.end method

.method public removeProximityAlert(Landroid/app/PendingIntent;)V
    .locals 1
    .parameter "intent"

    .prologue
    .line 338
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->removeProximityAlert(Landroid/app/PendingIntent;)V

    .line 339
    return-void
.end method

.method public removeTestProvider(Ljava/lang/String;)V
    .locals 1
    .parameter "provider"

    .prologue
    .line 346
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->removeTestProvider(Ljava/lang/String;)V

    .line 347
    return-void
.end method

.method public removeUpdates(Landroid/app/PendingIntent;)V
    .locals 1
    .parameter "intent"

    .prologue
    .line 353
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->removeUpdates(Landroid/app/PendingIntent;)V

    .line 354
    return-void
.end method

.method public removeUpdates(Landroid/location/LocationListener;)V
    .locals 1
    .parameter "listener"

    .prologue
    .line 361
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-virtual {v0, p1}, Lcom/peptalk/client/lbs/android/LbsManager;->removeLbsUpdates(Landroid/location/LocationListener;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 362
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1}, Landroid/location/LocationManager;->removeUpdates(Landroid/location/LocationListener;)V

    .line 364
    :cond_0
    return-void
.end method

.method public requestLbsCipherTicket(JLandroid/os/Looper;)Ljava/lang/String;
    .locals 1
    .parameter "maxTime"
    .parameter "looper"

    .prologue
    .line 160
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-virtual {v0, p1, p2, p3}, Lcom/peptalk/client/lbs/android/LbsManager;->requestLbsCipherText(JLandroid/os/Looper;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public requestLocationUpdates(Ljava/lang/String;JFLandroid/app/PendingIntent;)V
    .locals 6
    .parameter "provider"
    .parameter "minTime"
    .parameter "minDistance"
    .parameter "intent"

    .prologue
    .line 489
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    move-object v1, p1

    move-wide v2, p2

    move v4, p4

    move-object v5, p5

    invoke-virtual/range {v0 .. v5}, Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/app/PendingIntent;)V

    .line 490
    return-void
.end method

.method public requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;)V
    .locals 6
    .parameter "provider"
    .parameter "minTime"
    .parameter "minDistance"
    .parameter "listener"

    .prologue
    .line 419
    const-string v0, "lbs"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 420
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    invoke-virtual {v0, p2, p3, p4, p5}, Lcom/peptalk/client/lbs/android/LbsManager;->requestLbsLocationUpdates(JFLandroid/location/LocationListener;)Z

    .line 424
    :goto_0
    return-void

    .line 422
    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    move-object v1, p1

    move-wide v2, p2

    move v4, p4

    move-object v5, p5

    invoke-virtual/range {v0 .. v5}, Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;)V

    goto :goto_0
.end method

.method public requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;Landroid/os/Looper;)V
    .locals 7
    .parameter "provider"
    .parameter "minTime"
    .parameter "minDistance"
    .parameter "listener"
    .parameter "looper"

    .prologue
    .line 474
    const-string v0, "lbs"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 475
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->lbsManager:Lcom/peptalk/client/lbs/android/LbsManager;

    move-wide v1, p2

    move v3, p4

    move-object v4, p5

    move-object v5, p6

    invoke-virtual/range {v0 .. v5}, Lcom/peptalk/client/lbs/android/LbsManager;->requestLbsLocationUpdates(JFLandroid/location/LocationListener;Landroid/os/Looper;)Z

    .line 479
    :goto_0
    return-void

    .line 477
    :cond_0
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    move-object v1, p1

    move-wide v2, p2

    move v4, p4

    move-object v5, p5

    move-object v6, p6

    invoke-virtual/range {v0 .. v6}, Landroid/location/LocationManager;->requestLocationUpdates(Ljava/lang/String;JFLandroid/location/LocationListener;Landroid/os/Looper;)V

    goto :goto_0
.end method

.method public sendExtraCommand(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Z
    .locals 1
    .parameter "provider"
    .parameter "command"
    .parameter "extras"

    .prologue
    .line 499
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1, p2, p3}, Landroid/location/LocationManager;->sendExtraCommand(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Z

    move-result v0

    return v0
.end method

.method public setTestProviderEnabled(Ljava/lang/String;Z)V
    .locals 1
    .parameter "provider"
    .parameter "enabled"

    .prologue
    .line 508
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1, p2}, Landroid/location/LocationManager;->setTestProviderEnabled(Ljava/lang/String;Z)V

    .line 509
    return-void
.end method

.method public setTestProviderLocation(Ljava/lang/String;Landroid/location/Location;)V
    .locals 1
    .parameter "provider"
    .parameter "loc"

    .prologue
    .line 517
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    invoke-virtual {v0, p1, p2}, Landroid/location/LocationManager;->setTestProviderLocation(Ljava/lang/String;Landroid/location/Location;)V

    .line 518
    return-void
.end method

.method public setTestProviderStatus(Ljava/lang/String;ILandroid/os/Bundle;J)V
    .locals 6
    .parameter "provider"
    .parameter "status"
    .parameter "extras"
    .parameter "updateTime"

    .prologue
    .line 528
    sget-object v0, Lcom/peptalk/client/lbs/android/LocationManagerProxy;->locationManager:Landroid/location/LocationManager;

    move-object v1, p1

    move v2, p2

    move-object v3, p3

    move-wide v4, p4

    invoke-virtual/range {v0 .. v5}, Landroid/location/LocationManager;->setTestProviderStatus(Ljava/lang/String;ILandroid/os/Bundle;J)V

    .line 529
    return-void
.end method
